       <?php echo form_open_multipart('admin/pages/create/'.$this->uri->segment(4)); ?>	<!-- start title -->
		<div class="title corners_top" style="float:left;width:200px;"><h6 style="color:#900;" id="forms"><?php echo $title; ?></h6></div><!-- end title -->
        		<div class="proccess_bar">
                
         

    <ul class="menu_bar">
    <li><?php
	$data = array('name' => 'create', 'value' => ' ','class'=>'delete-1', 'id' => 'save');
	 echo form_submit($data);?> <!--<a href="#" ><span class="save-1"> </span>Save</a> -->
     Lưu
     </li>
	
     <li> <?php 
	 $data = array('name' => 'close', 'value' => ' ','class'=>'delete-1', 'id' => 'cancel');
	 
	 echo form_submit($data); ?>
     Hủy<!--<a href="#" ><span class="cancel-1"></span>Cancel</a>--></li>
    
    </ul>
    
    
 

 </div>
		
        <?php // echo '<p class="title">'.$this->lang->line('title_user_info').'</p>';
 if(isset($missing) && is_array($missing) )
   {
  
   echo ' <div><a href="javascript:();" title="Succes box" class="box error corners"><span class="close">&nbsp;</span>';
   foreach($missing as $item)
   {
   		echo $item."<br />";
   }
   echo "</a></div>";
   }
   
	?>
    <div class="content">
        
         <h6><?php echo 	$label =$this->lang->line('image'); ?></h6>
		<input type="text" id="fileName" class="file_input_textbox corners_left" readonly="readonly" />
 			<div class="file_input_div">
				<input type="button" value="" class="file_input_button" />
				<input type="file" name="img" id="img" class="file_input_hidden" onchange="javascript: document.getElementById('fileName').value = this.value" />
			</div>
            
     <?php 
//  $option[] = '--- Chọn Loại --- ';
  	
		 //$i =1;
	//	 $cat = array(0=> '--- Chọn Loại --- ',1 =>'Giới thiệu',2=>'Dịch Vụ');
	//	 print_r($cat);
	  $option[] = '--- Chọn Loại --- ';
  	 if(!empty($cat))
	 {
		 foreach($cat as $item)
		 {
			 $option[$item['cat_id']]= $item['cat_name'];
		 }
	 }
	
  echo '<div >';
  	echo '<h3>',form_label('Chủ đề'),'</h3>', form_dropdown('cate',$option,$this->uri->segment(4));
	echo '</div>';
	
	echo '<div style="clear:left"></div>';
  ?>
  
  
    

<h6><?php echo $this->lang->line('news_title'); ?></h6>
<?php
		//title  vi

echo '<div class="inner">';
	$code = "title_vi";
	$label ="Vietnamese".' <font color="red" style="font-weight:bold">(*)</font>';
	$data = array('name' =>$code,'class'=>'large_input corners' ,'id' => $code, 'value' => set_value($code));
	echo '<p>';
	echo form_label($label);
		if (! empty($missing) && array_key_exists($code, $missing))

		 echo form_input($data, set_value($code)),'<span class="info_error">error</span>';

	else
	  echo form_input($data, set_value($code));
	
	echo '</p>';
	
	
	//title en
if($num_lang >1)
{
	echo '<div class="inner">';
	$code = "title_en";
	$label ="English".' <font color="red" style="font-weight:bold">(*)</font>';

	$data = array('name' =>$code,'class'=>'large_input corners',  'value' => set_value($code));
	
	echo '<p>';
	echo form_label($label);
		if (! empty($missing) && array_key_exists($code, $missing))

		 echo form_input($data, set_value($code)),'<span class="info_error">error</span>';

	else
	  echo form_input($data, set_value($code));
	
	echo '</p>';

	echo '</div>';
}

	
//	echo '</div>';

	

?>

<h6><?php echo "Giới thiệu ngắn"; ?></h6> 
<?php

			//direction vietname
$code = "direction_vi";
	$label ="Vietnamese";
	echo '<div class="inner">';


		
	$data = array('name' =>$code,"style"=> "height:auto","rows"=>"10",'class'=>'large_input corners','id' => $code, 'value' => set_value($code));

	echo form_label($label). '<div class="textarea"> '.form_textarea($data).'</div>';

	echo '</div>';
	
	
	if($num_lang > 1)
{
		//direction english
$code = "direction_en";
	$label ="English";
	echo '<div class="inner">';

	if (! empty($missing) && array_key_exists($code, $missing))

		echo form_label($label, '', array('class'=>''));

	else

		echo form_label($label, '', array('style'=>'clear:both'));

	$data = array('name' =>$code, 'id' => $code,"rows"=>"10",'class'=>'large_input corners', 'value' => set_value($code),"style"=> "height:auto");

	echo '<div class="textarea">'.form_textarea($data).'</div>';

	echo '</div>';
	
}
	

?>


<h6><?php echo $this->lang->line('pages_detail'); ?></h6>
<?php

	
		//detailed_content vietnamese
$code = "detailed_content_vi";
	$label ="Vietnamese";
	echo '<div class="inner">';

	if (! empty($missing) && array_key_exists($code, $missing))

		echo form_label($label, '', array('class'=>''));

	else

		echo form_label($label);

	$data = array('name' =>$code, 'id' => $code,'value' => set_value($code));

	echo '<div class="textarea">'.form_textarea($data).'</div>';

	echo '</div>';
	
	if($num_lang > 1)
{
		//detailed_content english
$code = "detailed_content_en";
	$label ="English";
	echo '<div class="inner">';

	if (! empty($missing) && array_key_exists($code, $missing))

		echo form_label($label, array('class'=>''));

	else

		echo form_label($label);

	$data = array('name' =>$code, 'id' => $code, 'value' => set_value($code));

	echo '<div class="textarea" style="">'.form_textarea($data).'</div>';

	echo '</div>';
	
}
	
?>
<h6 style="clear:left;float:left;height:30px;width:120px;margin-top:5px;" > Trạng thái </h6>
<div style="float:left;margin-top:5px;height:30px;" >
<input  type="radio" name="status" id="status" value="1" checked="checked" />Hiện
<input  type="radio" name="status" id="status" value="0"  /> ẩn
</div>
<?php
	

	echo form_close(); //FORM END

	
	
	?> 
        
  <script type="text/javascript">

// This is a check for the CKEditor class. If not defined, the paths must be checked.
if ( typeof CKEDITOR == 'undefined' )
{
	document.write(
		'<strong><span style="color: #ff0000">Error</span>: CKEditor not found</strong>.' +
		'This sample assumes that CKEditor (not included with CKFinder) is installed in' +
		'the "/ckeditor/" path. If you have it installed in a different place, just edit' +
		'this file, changing the wrong paths in the &lt;head&gt; (line 5) and the "BasePath"' +
		'value (line 32).' ) ;
}
else
{
	var editor_detail =		CKEDITOR.replace("detailed_content_vi");
	<?php  
			echo 'var editor_detail2 = CKEDITOR.replace("detailed_content_en");';
	?>
	CKFinder.setupCKEditor( editor_detail,'<?php echo base_url(); ?>public/scripts/admin/ckfinder') ; 
<?php  
			echo "CKFinder.setupCKEditor( editor_detail2, '".base_url()."public/scripts/admin/ckfinder') ;";
?>
}

		</script>



